from django.core.management.base import BaseCommand, CommandError

# from placeholders import *
import os
from django.contrib.auth.hashers import make_password, check_password


class Command(BaseCommand):
    ps = "Diaolei1"
    dj_ps = make_password(ps, None, 'pbkdf2_sha256')  # 创建django密码， 第二个参数为None是每次产生的密码都不用，第三个参数为算法， 后面两个参数可以忽略

    print(dj_ps)
    ps_bool = check_password(ps, dj_ps)  # check_password 返回值为一个Bool类型，验证密码的正确与否
    print(ps_bool)